package cn.liccshop.core.service.shopGoodsAttr.service;

import cn.liccshop.core.entity.ShopGoodsAttr;
import cn.liccshop.sys.exception.MySystemException;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 商品属性表 服务类
 * </p>
 *
 * @author LiCC
 * @since 2019-04-08
 */
public interface IShopGoodsAttrService extends IService<ShopGoodsAttr> {

    /**
     * 通过商品ID查找商品属性
     * @param goodsId
     * @return
     */
    List<Map<String, List<ShopGoodsAttr>>> getShopGoodsAttrByGoodsId(String goodsId, String catId) throws MySystemException;

    /**
     * 添加商品出库存初始化
     * @param goodsId
     * @param catId
     * @return
     * @throws MySystemException
     */
    Map<String, Object> shopGoodsAttrByGoodsIdAndCatId(String goodsId, String catId) throws MySystemException;

    /**
     * 编辑商品库存初始化
     * @param goodsId
     * @param catId
     * @return
     * @throws MySystemException
     */
    Map<String, Object> shopProductsByGoodsIdAndCatId(String goodsId, String catId) throws MySystemException;

}
